package org.lc.stk.service.question;

import org.lc.stk.web.dto.question.EssayQuestionDTO;

/**
 * 问答题服务接口
 */
import org.lc.stk.web.dto.question.EssayQuestionDTO;

public interface EssayQuestionService extends QuestionService<EssayQuestionDTO> {
    
    /**
     * 验证问答题关键词列表
     */
    boolean validateKeywords(String[] keywords);
    
    /**
     * 检查评分标准是否完整
     */
    boolean validateScoringCriteria(String scoringCriteria);
    
    /**
     * 检查参考答案是否完整
     */
    boolean validateReferenceAnswer(String referenceAnswer);
    
    @Override
    default boolean validate(EssayQuestionDTO dto) {
        return dto != null &&
               validateReferenceAnswer(dto.getReferenceAnswer()) &&
               validateScoringCriteria(dto.getScoringCriteria()) &&
               validateKeywords(dto.getKeywords());
    }
}